package com.ruoyi.project.system.vehicledriver.service.impl;

import java.util.List;

import com.ruoyi.project.system.vehicledriver.domain.VeVehicledriverVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.system.vehicledriver.mapper.VeVehicledriverMapper;
import com.ruoyi.project.system.vehicledriver.domain.VeVehicledriver;
import com.ruoyi.project.system.vehicledriver.service.IVeVehicledriverService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 车辆驾驶员Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-01-08
 */
@Service
public class VeVehicledriverServiceImpl implements IVeVehicledriverService 
{
    @Autowired
    private VeVehicledriverMapper veVehicledriverMapper;

    /**
     * 查询车辆驾驶员
     * 
     * @param driverID 车辆驾驶员主键
     * @return 车辆驾驶员
     */
    @Override
    public VeVehicledriver selectVeVehicledriverByDriverID(Integer driverID)
    {
        return veVehicledriverMapper.selectVeVehicledriverByDriverID(driverID);
    }

    /**
     * 查询车辆驾驶员列表
     * 
     * @param veVehicledriver 车辆驾驶员
     * @return 车辆驾驶员
     */
    @Override
    public List<VeVehicledriver> selectVeVehicledriverList(VeVehicledriver veVehicledriver)
    {
        return veVehicledriverMapper.selectVeVehicledriverList(veVehicledriver);
    }

    @Override
    public List<VeVehicledriverVo> selectVeVehicledriverList1(VeVehicledriverVo veVehicledriverVo) {
        return veVehicledriverMapper.selectVeVehicledriverList1(veVehicledriverVo);
    }

    /**
     * 新增车辆驾驶员
     * 
     * @param veVehicledriver 车辆驾驶员
     * @return 结果
     */
    @Override
    public int insertVeVehicledriver(VeVehicledriver veVehicledriver)
    {
        return veVehicledriverMapper.insertVeVehicledriver(veVehicledriver);
    }

    /**
     * 修改车辆驾驶员
     * 
     * @param veVehicledriver 车辆驾驶员
     * @return 结果
     */
    @Override
    public int updateVeVehicledriver(VeVehicledriver veVehicledriver)
    {
        return veVehicledriverMapper.updateVeVehicledriver(veVehicledriver);
    }

    /**
     * 批量删除车辆驾驶员
     * 
     * @param driverIDs 需要删除的车辆驾驶员主键
     * @return 结果
     */
    @Override
    public int deleteVeVehicledriverByDriverIDs(String driverIDs)
    {
        return veVehicledriverMapper.deleteVeVehicledriverByDriverIDs(Convert.toStrArray(driverIDs));
    }

    /**
     * 删除车辆驾驶员信息
     * 
     * @param driverID 车辆驾驶员主键
     * @return 结果
     */
    @Override
    public int deleteVeVehicledriverByDriverID(Integer driverID)
    {
        return veVehicledriverMapper.deleteVeVehicledriverByDriverID(driverID);
    }
}
